﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace Budget.Core.DomainModel
{
    public class Category : BaseEntity
    {
        [DomainSignature]
        public virtual String Name { get; set; }

        public virtual ICollection<Product> Products { get; protected set; }

        public Category()
        {
            Products = new Collection<Product>();
        }

        public override string ToString()
        {
            return string.Format("Category (ID: {0}, Name: {1}, Count of products: {2})", Id, Name, Products.Count);
        }
    }
}
